  ________       __          ________                          ___ ___                __    
 /  _____/______|__| _____   \______ \ _____ __  _  ______    /   |   \  ____   ____ |  | __
/   \  __\_  __ \  |/     \   |    |  \\__  \\ \/ \/ /    \  /    ~    \/  _ \ /  _ \|  |/ /
\    \_\  \  | \/  |  | |  \  |    `   \/ __ \\     /   |  \ \    Y    (  <_> |  <_> )    < 
 \______  /__|  |__|__|_|  / /_______  (____  /\/\_/|___|  /  \___|_  / \____/ \____/|__|_ \
        \/               \/          \/     \/           \/         \/                    \/
    
    Grim Dawn Hook (c) 2015 atom0s [atom0s@live.com]

----------------------------------------------------------------------------------------------------

    The following documentation is an explanation of the events that addons can
    register to. Please be sure to read carefully!
    
----------------------------------------------------------------------------------------------------

>> Valid Events

    The following events are currently valid to be registered to:
        - load
        - unload
        - command
        - prerender
        - render
        - prereset
        - postreset
        - mouseevent
        
----------------------------------------------------------------------------------------------------

>> load Event

    The load event is invoked when your addon is first loaded. 
    It is also invoked when the addon is reloaded.
    
    An example of this event would be:
    
        hook.register_event('load', function()
            print('Load event was called!');
        end);
        
    Parameters
        None.
        
    Return Value
        None.
        
----------------------------------------------------------------------------------------------------

>> unload Event

    The unload event is invoked when your addon is unloaded. 
    It is also invoked when the addon is reloaded.
    
    An example of this event would be:
    
        hook.register_event('unload', function()
            print('Unload event was called!');
        end);
        
    Parameters
        None.
        
    Return Value
        None.
        
----------------------------------------------------------------------------------------------------

>> command Event

    The command event is invoked when a user enters a console command into the GDHook console.
    This event allows addons to attempt to handle the incoming command before the GDHook does.
        
    An example of this event would be:
    
        hook.register_event('command', function(cmd)
            print(string.format('The command entered was: %s', cmd));
            return false;
        end);
        
    Parameters
        cmd 
            (string) The raw command string entered into the console.
        
    Return Value
        bool 
            True if the command was handled by the addon, false otherwise.
        
    PLEASE NOTE: It is important that you return true or false in this event. If your addon does
    handle the command, return true. Otherwise return false allowing other addons and the hook to
    see the command. Returning true blocks other addons and the GDHook from ever seeing the command
    so do not get greedy with handling commands!
        
----------------------------------------------------------------------------------------------------

>> prerender Event

    The prerender event is invoked when the game calls BeginScene on the Direct3D device.
    This event is typically used for objects to begin preparing to render to the screen.
    
    Addons will typically never need to worry about this event.
    
    An example of this event would be:
    
        hook.register_event('prerender', function()
            print('Prerender event was called!');
        end);
        
    Parameters
        None.
        
    Return Value
        None.
        
----------------------------------------------------------------------------------------------------

>> render Event

    The render event is invoked when the game calls EndScene on the Direct3D device.
    This event is typically used for objects to render themselves to the screen.
    
    Addons will typically use this function as a source of a 'timer' to update their internal
    variables, read from or write to memory for cheats, and so on.
    
    An example of this event would be:
    
        hook.register_event('render', function()
            print('Render event was called!');
        end);
        
    Parameters
        None.
        
    Return Value
        None.
        
----------------------------------------------------------------------------------------------------

>> prereset Event

    The prereset event is invoked when the game calls Reset on the Direct3D device.
    This event is typically used for objects to invalidate themselves.
    
    Addons will typically never need to use this event.
    
    An example of this event would be:
    
        hook.register_event('prereset', function()
            print('Prereset event was called!');
        end);
        
    Parameters
        None.
        
    Return Value
        None.
        
----------------------------------------------------------------------------------------------------

>> postreset Event

    The postreset event is invoked when the game calls Reset on the Direct3D device.
    This event is typically used for objects to recreate themselves.
    
    Addons will typically never need to use this event.
    
    An example of this event would be:
    
        hook.register_event('postreset', function()
            print('postreset event was called!');
        end);
        
    Parameters
        None.
        
    Return Value
        None.
        
----------------------------------------------------------------------------------------------------

>> mouseevent Event

    The mouseevent event is invoked when an addon registers a font object to receive mouse messages.
    This event is called whenever a mouse message happens that can interact with the given font object.
    
    An example of this event would be:
    
        hook.register_event('mouseevent', function(nType, name, x, y)
            print('mouseevent event was called!');
        end);
        
    Parameters
        nType
            (number) The event id that is occurring.
        name
            (string) The name of the font object that caused the event.
        x
            (number) The x coord the event occurred at.
        y
            (number) The y coord the event occurred at.
        
    Return Value
        None.
        
    PLEASE NOTE: All font objects that you attach a mouse event handler to will be invoked through this
    same event. You DO NOT need to create multiple events for multiple objects. Instead, use one event and
    check the 'name' parameter when the event is called to determine which of your font objects the event
    is for.
    